package gae.testjig.ofy.dto;

import javax.persistence.Id;

import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Indexed;
import com.googlecode.objectify.annotation.Parent;
import com.googlecode.objectify.annotation.Unindexed;

@Unindexed
public class OSeat {
	
	@Id private String entityId;
	@Parent private Key<OSeatsRoot> seatRootKey;
	
	@Indexed private String seatId;
	private String ownerName;
	private long timeStamp;

	public OSeat() {}
	
	public OSeat(Key<OSeatsRoot> seatRootKey, String seatId, String ownerName) {
		this.entityId = seatId;
		this.seatRootKey = seatRootKey;
		this.seatId = seatId;
		this.ownerName = ownerName;
		this.timeStamp = System.currentTimeMillis();
	}
	
	public String getEntityId() {
		return entityId;
	}
	public void setEntityId(String entityId) {
		this.entityId = entityId;
	}
	public Key<OSeatsRoot> getSeatRootKey() {
		return seatRootKey;
	}
	public void setSeatRootKey(Key<OSeatsRoot> seatRootKey) {
		this.seatRootKey = seatRootKey;
	}
	public String getSeatId() {
		return seatId;
	}
	public void setSeatId(String seatId) {
		this.seatId = seatId;
	}
	public String getOwnerName() {
		return ownerName;
	}
	public void setOwnerName(String ownerName) {
		this.ownerName = ownerName;
	}
	public long getTimeStamp() {
		return timeStamp;
	}
	public void setTimeStamp(long timeStamp) {
		this.timeStamp = timeStamp;
	}

}
